Skip to content

[7.15] Properly handle wildcards in data stream deletion requests (#78463)#78509

Merged
danhermann merged 1 commit intoelastic:7.15from
danhermann:backport_715_78463_ds_wildcards
Sep 30, 2021
Merged

[7.15] Properly handle wildcards in data stream deletion requests (#78463)#78509
danhermann merged 1 commit intoelastic:7.15from
danhermann:backport_715_78463_ds_wildcards

Conversation

@danhermann
Copy link
Contributor

The root cause of this bug was the replacement of the wildcard expression in the request's indices member with the actual data streams that expression matched. In the case that the authz code had already replaced it with the *,-* token that means "no authorized data streams", the expression would be evaluated again, would match no data streams, and would set the indices member to an empty array. An empty array is equivalent to *, so all data streams would then be deleted.

Fixes #78422

Backport of #78463

@elasticmachine elasticmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Sep 30, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@danhermann danhermann merged commit 43077c1 into elastic:7.15 Sep 30, 2021
@danhermann danhermann deleted the backport_715_78463_ds_wildcards branch September 30, 2021 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport >bug :StorageEngine/Data streams Data streams and their lifecycles Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v7.15.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants